package sz.sz3;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import pojo.User;
import service.UserService;

public class SZTest {
    @Test
    public void aopTest(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext2.xml");
        UserService service = (UserService) context.getBean("userService");
        User user = new User();
        user.setId(1);
        user.setUsername("cs");
        user.setPassword("666");
        user.setEmail("test@666.com");
        service.save(user);
    }
}
